1. Field of Invention
The present invention relates to the field of computer, and in particular to a storage device and a method for protecting its partitions.
2. Description of Prior Art
Currently, the application of the computer has prevailed in our daily life. In order to provide difference and added value, various personal computer (PC) manufactures offer for users various functional software which is generally divided into application software and system software. Application software usually contains drive programs, while system software can be Pre-Boot system software which can be started to carry out such functions as salvation and restoration of the primary operating system before the execution of the primary operating system, such as Windows. Most of the functional software is initially provided in the form of a disk. With the expansion of storage device space, a partition on a storage device can be reserved to store the functional software, and such partition should be protected as well as possible from being damaged by a user.
At present, there are mainly two protection schemes for implementing the protection on the partition.
1. HPA Partition Protection Scheme
Host Protect Area (HPA) is a harddisk high-end area which is protected by utilizing SetMax instruction in the ATA specification. This scheme sets the size of the HPA partition through two ATA instructions of SetMax and Read Native Max Address so that the HPA partition is normally invisible to DOS and Windows platforms and, when in the protected status, even cannot be read by Mainboard Basic Input Output System (BIOS), for the purpose of protecting the data in the HPA partition. For example, if 10 G of a harddisk with capacity of 80 G is set as HPA partition, only the capacity of 70 G can be detected by BIOS.
This above scheme, however, has the following drawbacks:
(1) there is a problem with compatibility between the HPA partition and the harddisk, and thus stability is relatively poor;
(2) there is no file system in the HPA partition, so it is difficult to parse and maintain data, and a great effort is required to develop and maintain production tools;
(3) the harddisk data known to users differ from the actual data, and sometimes there exists a gap of several GBs, which leads to the increase in after-sale cost.
2. Type 12 Partition Protection Scheme
This scheme is to set the protected partition on a harddisk as Type 12 partition which is not loaded after the startup of the Windows OS, Microsoft. Therefore, a user can only view the partition in “disk management” but cannot perform any function, such as formatting and deletion, on it, except the operation of “Help”. In this way, the goal of protecting the data in Type 12 partition is achieved.
Unfortunately, the above scheme has disadvantages in that, since the presence of system data and application data in the Type 12 partition is based on a file system (e.g., standard file system FAT32 or NTFS, etc.), security is weakened when the Type 12 partition is mounted as a disk label by the user and subjected to data reading/writing or it is damaged by the user with a third-party disk tool.